#ifndef SWAPBOOM_H
#define SWAPBOOM_H

class Swapboom
{
public:
    Swapboom();
    enum {
        None, Boom
    };

    enum State {
        Closed, Opened, Marked
    };

    int getBooms() const;
    void setBooms(int val);
    int getRows() const;
    int getColumns() const;
    int setRows(int rows);
    int setColumns(int cols);
    int getState(int row, int col) const;
    int getNum(int row, int col) const;
    int isBoom(int row, int col) const;
    bool open(int row, int col);
    bool turnFlag(int row, int col);
    void genMp();
    void replay();

protected:
    virtual void failure();
    virtual void win();
    void openAll();
    int mp[100][100];
    int stateMp[100][100];
    int cntRows;
    int cntColumns;
    int cntBooms;
    int leftBooms;
};

#endif // SWAPBOOM_H
